package schach.server.model;

import java.io.Serializable;
import java.util.ArrayList;

public class Dame extends Figur{

	public Dame(Feld position, boolean alive, boolean black) {
		super(position, alive, black);
	}

	@Override
	public ArrayList<Feld> crossedFields(Feld f, boolean schlagen) throws NullPointerException {
		ArrayList<Feld> results = new ArrayList<Feld>();
		Turm turm = new Turm(this.getPosition(), true, true);
		Laeufer laeufer = new Laeufer(this.getPosition(), true, true);
		
		try{
			results = turm.crossedFields(f, false);
			return results;
		}
		catch (Exception e){
			try{
				results = laeufer.crossedFields(f, false);
				return results;
			}catch (Exception e1){
				throw new NullPointerException();
			}
		}
	}

}
